import { createRouter, createWebHistory } from 'vue-router'

import Home from '@/views/home.vue'
import Cla from '@/views/cla.vue'
import Detail from '@/views/detail.vue'
import Search from '@/views/search.vue'
import Cart from '@/views/cart.vue'
import Create from '@/views/create.vue'
import Pay from '@/views/pay.vue'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: Home,
    },
    {
      path: '/cla',
      name: 'cla',
      component: Cla,

    },
    {
      path: '/detail/:goods_id',
      name: 'detail',
      component: Detail,

    },
    {
      path: '/search/:query',
      name: 'search',
      component: Search,

    },
    {
      path: '/cart',
      name: 'cart',
      component: Cart,

    },
    {
      path: '/create',
      name: 'create',
      component:Create,

    },
    {
      path: '/pay',
      name: 'pay',
      component:Pay,

    },


  ],
})

export default router
